<?php
/*
# ------------------------------------------------------------------------
# JA Seleni for Joomla 1.5.x - Version 1.0 - Licence Owner JA115884
# ------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - Copyrighted Commercial Software
# Author: J.O.O.M Solutions Co., Ltd
# Websites:  http://www.joomlart.com -  http://www.joomlancers.com
# This file may not be redistributed in whole or significant part.
# ------------------------------------------------------------------------
*/

// no direct access
defined('_JEXEC') or die('Restricted access');  ?>
<span class="breadcrumbs pathway">
<?php 
$start = $count > 1?1:0;
for ($i = $start; $i < $count; $i ++) :
	
	// clean subtitle from breadcrumb
	if ($pos = strpos($list[$i]->name, '[')) {
		$name = trim(substr($list[$i]->name, 0, $pos));
	} else {
		$name = $list[$i]->name;
	}

	// If not the last item in the breadcrumbs add the separator
	if ($i < $count -1) {
		if(!empty($list[$i]->link)) {
			echo '<a href="'.$list[$i]->link.'" class="pathway">'.$name.'</a>';
		} else {
			echo $name;
		}
		echo ' '.$separator.' ';
	}  else if ($params->get('showLast', 1)) { // when $i == $count -1 and 'showLast' is true
	    echo $name;
	}
endfor; ?>
</span>
